#include "datacenter.h"

#include <QObject>
#include <QTest>

class DataCenterTest : public QObject
{
	Q_OBJECT
private slots:
	void initTestCase();
	void cleanupTestCase();
	void connectDBTest();
private:
	DataCenter* m_DataCenter;
};

void DataCenterTest::initTestCase()
{
	m_DataCenter = new DataCenter("127.0.0.1", 1433, "NetworkProgram", "NetworkProgram", "123456");
}

void DataCenterTest::connectDBTest()
{
	QVERIFY(m_DataCenter->isOpen() == true);
}

void DataCenterTest::cleanupTestCase()
{
	delete m_DataCenter;
}

//QTEST_MAIN(DataCenterTest)
#include "datacentertest.moc"
